package ${dtoPackage};

import ${baseDTOName};
import com.liaoyifan.core.valid.groups.Opera;
<#if importSchema??>
import io.swagger.v3.oas.annotations.media.Schema;
</#if>
<#if hasIdColumn??>
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Null;
</#if>
import java.io.Serial;
<#if importBigDecimal??>
import java.math.BigDecimal;
</#if>
<#if importLocalDate??>
import java.time.LocalDate;
</#if>
<#if importLocalDateTime??>
import java.time.LocalDateTime;
</#if>
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * ${tableComment}
 *
 * @author ${author}
 * @since ${since}
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class ${dtoName} extends ${baseDTOSimpleName} {

    @Serial private static final long serialVersionUID = 1L;

    <#list columns as column>
    <#if column.columnComment?has_content>
    @Schema(description = "${column.columnComment}")
    </#if>
    <#if column.javaName == "id">@Null(groups = Opera.Insert.class) @NotNull(groups = {Opera.Update.class, Opera.Delete.class}) </#if>private ${column.javaType} ${column.javaName};
    <#if column_has_next>

    </#if>
    </#list>
}
